﻿namespace Profit.Views
{
    using System.Windows;
    using Interfaces;

    /// <summary>
    /// Interaction logic for SettingsView.xaml
    /// </summary>
    public partial class SettingsView : Window, ISettingsView
    {
        public SettingsView()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Show a dialog view
        /// </summary>
        /// <param name="parent"></param>
        /// <returns></returns>
        public bool? ShowDialog(IView parent)
        {
            this.Owner = parent as Window;
            this.WindowStartupLocation =
                parent == null
                    ? WindowStartupLocation.CenterScreen
                    : WindowStartupLocation.CenterOwner;

            return ShowDialog();
        }
    }
}
